package com.oocl.jms.customer;

import com.oocl.util.JmsUtil;

public class MerchantConsumerFactory {
	private static MerchantConsumerFactory factory;
	
	private MerchantConsumerFactory() {
	}
	
	public static MerchantConsumerFactory getInstance(){
		if(null==factory){
			synchronized (MerchantConsumerFactory.class) {
				if(null==factory){
					factory = new MerchantConsumerFactory();
				}
			}
		}
		return factory;
	}
	
	public Consumer newConsumer(String queueName){
		return new MerchantConsumer(queueName, JmsUtil.getMqUrl());
	}
}
